import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:untitled/pages/mywidgets.dart';

class HomeTop extends StatefulWidget {
  const HomeTop({Key? key}) : super(key: key);

  @override
  State<HomeTop> createState() => _HomeTopState();
}

class _HomeTopState extends State<HomeTop> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 290.h,
      width: 432.w,
      decoration: BoxDecoration(
        image:DecorationImage(
          image: AssetImage('assets/bg11.png'),
          fit: BoxFit.fill
        )
      ),
      child: Stack(
        alignment: AlignmentDirectional.topCenter,
        children: [
          Positioned(
            child:Container(
              margin: EdgeInsets.only(top: 10.h),
              padding: EdgeInsets.only(top:10.h),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  topShow('assets/top01.png','扫一扫',40.w),
                  topShow('assets/top02.png','转账',40.w),
                  topShow('assets/top03.png','数字人民币',40.w),
                  topShow('assets/top04.png','我的资产',40.w),
                ],
              ),
            ) 
          ),
          Positioned(
            bottom:0,
            child: Container(
              padding:EdgeInsets.only(top:20.h),
              child: Column(
                children: [
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      topShow2('assets/g1.png','存款',20.w),
                      topShow2('assets/g2.png','贷款',20.w),
                      topShow2('assets/g3.png','理财产品',20.w),
                      topShow2('assets/g4.png','信用卡',20.w),
                      topShow2('assets/g5.png','直销银行',20.w),
                    ],
                  ),
                  SizedBox(height: 15,),
                   Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      topShow2('assets/g6.png','VIP专区',20.w),
                      topShow2('assets/g7.png','代销基金',20.w),
                      topShow2('assets/g8.png','代销理财',20.w),
                      topShow2('assets/g9.png','代销保险',20.w),
                      topShow2('assets/g10.png','全 部',20.w),
                    ],
                  ),
                ],
              ),
              width: 340.w,
              height: 185.h,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(10),
                  topRight: Radius.circular(10)
                )
              ),
            )
          )
        ],
      ),
    );
    
  }
}